<script setup>
  import useUserStore from '@/stores/user'
  const { user, getUser } = useUserStore()
  if (!user) {
    getUser()
  }
</script>

<template>
  <div class="flex items-center justify-center w-full h-full">
    <div class="flex flex-col items-center justify-center">
      <div class="login"></div>
      <div class="mt-2 mt-4 text-sm text-slate-500">系统登录中...</div>
    </div>
  </div>
</template>

<style scoped>
  .login {
    width: 50px;
    height: 50px;
    border-radius: 50px;
    border: 5px solid #19C37D;
    border-top-color: rgb(0 0 0 / 0);
    animation: rotateLoop 1s infinite linear;
  }

  @keyframes rotateLoop {
    100% {
      transform: rotate(360deg);
    }
  }
</style>